//
//  KCWebChatViewController.m
//  S0001_ViewTransition
//
//  Created by yao_yu on 14-8-31.
//  Copyright (c) 2014年 yao_yu. All rights reserved.
//

import UIKit

class KCWebChatViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        setupViews()
    }
    
    func setupViews(){
        view.backgroundColor = UIColor.redColor()
        
        title = "聊天"
        
        //注意通过tabBarController或者parentViewController可以得到其俯视图控制器（也就是KCTabBarViewController）
        assert(self.tabBarController == self.parentViewController, "视图异常")
        
        tabBarItem.title = "网络聊天"
        tabBarItem.image = UIImage(named: "tabbar_mainframe.png")
        tabBarItem.selectedImage = UIImage(named: "tabbar_mainframeHL.png")
        
        tabBarItem.badgeValue = "5"
        
        
        //        [super viewDidLoad];
        //
        //        self.view.backgroundColor=[UIColor redColor];
        //
        //        //设置视图控制器标题
        //        self.title=@"Chat";
        //
        //        //注意通过tabBarController或者parentViewController可以得到其俯视图控制器（也就是KCTabBarViewController）
        //        NSLog(@"%i",self.tabBarController==self.parentViewController);//对于当前应用二者相等
        //
        //        //设置图标、标题(tabBarItem是显示在tabBar上的标签)
        //        self.tabBarItem.title=@"Web Chat";//注意如果这个标题不设置默认在页签上显示视图控制器标题
        //        self.tabBarItem.image=[UIImage imageNamed:@"tabbar_mainframe.png"];//默认图片
        //        self.tabBarItem.selectedImage=[UIImage imageNamed:@"tabbar_mainframeHL.png"];//选中图片
        //        
        //        //图标右上角内容
        //        self.tabBarItem.badgeValue=@"5";
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
